package org.example.pingpong.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@ApiModel(description = "赛事表单实体")
@Validated
public class EventFormDTO {

    @ApiModelProperty(value = "id", required = true, example = "1")
    @JsonProperty("ID")
    private Integer id;

    @ApiModelProperty(value = "场地id")
    @NotNull
    @JsonProperty("AREA_ID")
    private Integer areaId;

    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    @NotEmpty
    @JsonProperty("TITLE")
    private String title;

    /**
     *
     */
    @ApiModelProperty(value = "比赛开始时间")
    @NotNull
    @JsonProperty("START_TIME")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    /**
     *
     */
    @ApiModelProperty(value = "比赛结束时间")
    @NotNull
    @JsonProperty("END_TIME")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    /**
     *
     */
    @ApiModelProperty(value = "清理开始时间")
    @NotNull
    @JsonProperty("CLEAR_START_TIME")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date clearStartTime;

    /**
     *
     */
    @ApiModelProperty(value = "清理结束时间")
    @NotNull
    @JsonProperty("CLEAR_END_TIME")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date clearEndTime;

    /**
     *
     */
    @ApiModelProperty(value = "最大参数人数")
    @NotNull
    @JsonProperty("MAX_PLAYER")
    private Integer maxPlayer;

    /**
     *
     */
    @ApiModelProperty(value = "最大观赛人数")
    @NotNull
    @JsonProperty("MAX_VIEW")
    private Integer maxView;

    /**
     * 赛场信息
     */
    @ApiModelProperty(value = "赛事信息")
    @JsonProperty("MSG")
    private String msg;

    /**
     *
     */
    @ApiModelProperty(value = "赛事图片")
    @JsonProperty("PIC")
    private String pic;
}
